package cn.xing.managementSystem.domain;

import cn.xing.managementSystem.enums.CourseType;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.persistence.*;

/**
 * @author cuixing
 * @package cn.xing.managementSystem.domain
 * @class Course
 * @email xing.cui@magicwindow.cn
 * @date 2018/4/24 上午10:23
 * @description
 */

@Data
@Table(name="course")
@Entity
public class Course extends BaseEntity{


    @JSONField(name = "course_name")
    @JsonProperty("course_name")
    @Column(name="course_name")
    private String courseName;

    @Enumerated
    @JSONField(name = "course_type")
    @JsonProperty("course_type")
    @Column(name="course_type")
    private CourseType courseType;


    @JSONField(name = "image_store")
    @JsonProperty("image_store")
    @OneToOne
    @JoinColumn(name="image_store_id")
    private ImageStore imageStore;

    @JSONField(name = "course_introduction")
    @JsonProperty("course_introduction")
    @Column(name="course_introduction")
    private String courseIntroduction;

    @JSONField(name = "course_detail")
    @JsonProperty("course_detail")
    @Column(name="course_detail")
    private String courseDetail;

}